import requests

import config
from Api.Login import LoginApi


class AccoutApi:

    # 实名认证
    def real_name(self,session, realname: str, id_card: str):
        resp = session.post(url=f"{config.BASE_URL}/member/realname/approverealname",
                            data= {"realname":realname,"card_id":id_card},
                            files = {"key":"value"})
        return resp

    # 开户
    def open_account(self,session):
        resp =session.post(url=f"{config.BASE_URL}/trust/trust/register",)
        return resp






if __name__ == "__main__":
    api = AccoutApi()
    login_api = LoginApi()
    session = requests.session()
    login_api.login(session, "13613512001", "a123123")
    session = api.real_name(session, realname="张三", id_card="110101199003076259")
    print(session.text)